package com.dycn.posdashboard.data;

import java.io.Serializable;
import java.util.List;


public class PaginatedInfor<T> implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -9140619287161936846L;
	private int totalRecords;//总的记录数
	private int pageId;//当前页码信息 从1开始
	private int pageRecords=20;//每页记录数
	private List<T> dataList; //当前页的数据集合
	
	public int getTotalPage(){
		if(totalRecords%pageRecords==0){
			return totalRecords/pageRecords;
		}else{
			return totalRecords/pageRecords+1;
		}
	}
	
	public int getPageId() {
		return pageId;
	}

	public void setPageId(int pageId) {
		this.pageId = pageId;
	}

	public int getPageRecords() {
		return pageRecords;
	}

	public void setPageRecords(int pageRecords) {
		this.pageRecords = pageRecords;
	}

	public int getTotalRecords() {
		return totalRecords;
	}

	public void setTotalRecords(int totalRecords) {
		this.totalRecords = totalRecords;
	}

	public List<T> getDataList() {
		return dataList;
	}

	public void setDataList(List<T> dataList) {
		this.dataList = dataList;
	}


	
}
